package com.lovo.middleman.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class FileConfig  implements WebMvcConfigurer {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        //自定义资源  处理资源的方法
        //以 /photo/ 过来的请求 , 进行处理
        registry.addResourceHandler("/face/**")
                .addResourceLocations("file:D:/picture/");
    }
}
